Skip to content

[codex] Add connector package prototype#3436

Draft
dannyzhang-oai wants to merge 3 commits into
mainfrom
codex/agent-sdk-connector-package-prototype
Draft

[codex] Add connector package prototype#3436
dannyzhang-oai wants to merge 3 commits into
mainfrom
codex/agent-sdk-connector-package-prototype

Conversation

@dannyzhang-oai
Copy link
Copy Markdown

@dannyzhang-oai dannyzhang-oai commented May 16, 2026

Summary

Adds an initial Agents SDK connector package prototype that composes existing SDK primitives instead of introducing a separate runtime.

  • Adds Connector, ConnectorComponents, connector policy labels, and HostedConnectorAuthorization.
  • Allows Agent(connectors=[...]) to include connector-provided direct tools and MCP servers in the existing tool resolution path.
  • Adds package loading for shared Codex plugin-style bundles via .codex-plugin/plugin.json, .mcp.json, and optional .app.json hosted connector IDs.
  • Preserves existing positional Agent(...) constructor compatibility by appending the new connectors field.
  • Adds an end-to-end demo at examples/connectors/package_demo.py and English docs/API reference coverage for connectors.

Motivation

This explores a direct Agents SDK adapter for the shared plugin/package model we discussed, while keeping execution on the existing Tool, HostedMCPTool, and MCPServer paths.

Validation

  • uv run --frozen pytest tests/test_connectors.py tests/test_connector_demo.py tests/test_source_compat_constructors.py::test_agent_connectors_append_preserves_reset_tool_choice_position -q
  • uv run --frozen python examples/connectors/package_demo.py --verify
  • uv run --frozen ruff format --check src/agents/connectors.py src/agents/agent.py src/agents/__init__.py examples/connectors/package_demo.py tests/test_connectors.py tests/test_connector_demo.py tests/test_source_compat_constructors.py
  • uv run --frozen ruff check src/agents/connectors.py src/agents/agent.py src/agents/__init__.py examples/connectors/package_demo.py tests/test_connectors.py tests/test_connector_demo.py tests/test_source_compat_constructors.py
  • uv run --frozen mypy src/agents/connectors.py src/agents/agent.py tests/test_connectors.py tests/test_connector_demo.py tests/test_source_compat_constructors.py
  • uv run --frozen pyright src/agents/connectors.py src/agents/agent.py tests/test_connectors.py tests/test_connector_demo.py tests/test_source_compat_constructors.py
  • uv run --frozen mkdocs build

Full make tests was not run; this is focused prototype validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant